#include "stdio.h"

const int maxLen=105;
const char hex[16]={'0','8','4','C','2','A','6','E','1','9','5','D','3','B','7','F'};


int compare(char  a1,char  a2){
    if(a1>a2)
    {
        return 1;
    }
    return 0;
}

void sort(char* array,int n)
{
    int i,j;
    int** queue=new int*[n];
    int start=0;
    int end=1;
    queue[start]=new int[2];
    queue[start][0]=0;
    queue[start][1]=n;
    //开始快排
    while (start<end)
    {
        int s=queue[start][0];
        int e=queue[start][1];
        
        i=s;
        j=e-1;
        int tmpIndex=j;
        char tmp=array[tmpIndex];
        while (i<j)
        {
            if(tmpIndex==j)
            {
                //前面大于后面
                if(compare(array[i],tmp))
                {
                    array[tmpIndex]=array[i];
                    tmpIndex=i;
                    // tmp=array[tmpIndex];
                }
            }
            else
            {
                //前面大于后面
                if(compare(tmp,array[j]))
                {
                    array[tmpIndex]=array[j];
                    tmpIndex=j;
                    // tmp=array[tmpIndex];
                }
            }

            if(tmpIndex==j)
            {
                i++;
            }
            else{
                j--;
            }

            
        }

        array[i]=tmp;

        start++;
        if(s<i)
        {
            end++;
            queue[end-1]=new int[2];
            queue[end-1][0]=s;
            queue[end-1][1]=i;
        }

        if(i+1<e)
        {
            end++;
            queue[end-1]=new int[2];
            queue[end-1][0]=i+1;
            queue[end-1][1]=e;
        }
    }

    for(i=0;i<end;i++)
    {
        delete queue[i];
    }
    delete queue;
}


int main(){
    int i,j;
    char str1[maxLen],str2[maxLen];

    scanf("%s %s",str1,str2);
    char* ss1=new char[maxLen];
    char* ss2=new char[maxLen];
    int len1=0,len2=0;

    j=0;

    i=0;
    while (str1[i]!='\0')
    {
        if(j%2==0)
        {
            ss1[j/2]=str1[i];
            len1++;
        }
        else{
            ss2[j/2]=str1[i];
            len2++;
        }
        j++;
        i++;
    }

    i=0;
    while (str2[i]!='\0')
    {
        if(j%2==0)
        {
            ss1[j/2]=str2[i];
            len1++;
        }
        else{
            ss2[j/2]=str2[i];
            len2++;
        }
        j++;
        i++;
    }

    sort(ss1,len1);
    sort(ss2,len2);
    int len=len1+len2;

    char tmp;
    for(i=0;i<len;i++)
    {
        if(i%2==0)
        {
            tmp=ss1[i/2];
        }
        else{
            tmp=ss2[i/2];
        }
        
        if(tmp>='0'&&tmp<='9')
        {
            printf("%c",hex[tmp-'0']);
        }
        else if (tmp>='A'&&tmp<='F')
        {
            printf("%c",hex[tmp-'A'+10]);
        }
        else if (tmp>='a'&&tmp<='f')
        {
            printf("%c",hex[tmp-'a'+10]);
        }
        else{
            printf("%c",tmp);
        }
    }

    delete ss1;
    delete ss2;
    
    return 0;
}